package org.meetunexpectedly.meetunexpectedly;

import org.junit.jupiter.api.Test;
import org.meetunexpectedly.service.audit.AuditService;
import org.meetunexpectedly.service.login.EmailService;
import org.meetunexpectedly.util.EncryptionUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
class MeetUnexpectedlyApplicationTests {

    @Autowired
    private EmailService emailService;

    @Autowired
    private EncryptionUtil encryptionUtil;

    @Test
    void testEmail() {
        emailService.send("1617967498@qq.com", "测试");
    }

    @Test
    void testEncryption() throws Exception {
        String encrypt = encryptionUtil.encrypt("123456");
        System.out.println(encrypt);

        String decrypt = encryptionUtil.decrypt(encrypt);
        System.out.println(decrypt);
    }


}
